import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-accessstore-list',
  templateUrl: './accessstore-list.component.html',
  styleUrls: ['./accessstore-list.component.scss']
})
export class AccessstoreListComponent implements OnInit {
  kf: string = '0';//库房
  searchCode: string = ''; //库房编码
  searchName: string = "" //物业名称
  typeYw: string = '0';//业务类型
  dateRange = [];//日期选择
  
  listOfData = [
    {
      pctm: '1',
      count: '123',
      gg: '234',
      zl: '5656',
      remark: '5656',
      rkr: '5656',
      rkDate: '2020-02-12',
    }
  ]

  startValue: Date | null = null;
  endValue: Date | null = null;
  endOpen = false;

  constructor() { }
  departValue: string = '';//部门名称
  ngOnInit() {
  }
  handleSearch(){};
  disabledStartDate = (startValue: Date): boolean => {
    if (!startValue || !this.endValue) {
      return false;
    }
    return startValue.getTime() > this.endValue.getTime();
  };

  disabledEndDate = (endValue: Date): boolean => {
    if (!endValue || !this.startValue) {
      return false;
    }
    return endValue.getTime() <= this.startValue.getTime();
  };
  onStartChange(date: Date): void {
    this.startValue = date;
  }

  onEndChange(date: Date): void {
    this.endValue = date;
  }
  handleStartOpenChange(open: boolean): void {
    if (!open) {
      this.endOpen = true;
    }
    //  console.log('handleStartOpenChange', open, this.endOpen);
  }

  handleEndOpenChange(open: boolean): void {
    //console.log(open);
    this.endOpen = open;
  }
}
